package org.zhxy.zhxy.dao;

import org.apache.ibatis.annotations.Param;
import org.zhxy.zhxy.entity.AppointRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.zhxy.zhxy.entity.dto.ClassRoomAppointAddDto;

import java.time.LocalDate;
import java.util.List;

/**
 * @InterfaceName AppointRecordDao
 * @Description 预约记录表(AppointRecord)表数据库访问层
 * @author yayong
 * @date 2024-10-19 20:38:05
 * @Version 1.0
 **/
public interface AppointRecordDao extends BaseMapper<AppointRecord>{


     List<AppointRecord> selectListByParam(ClassRoomAppointAddDto classRoomAppointAddDto);

    List<AppointRecord> selectListByUserIdAndStatus(@Param("userId") Integer userId, @Param("status")String status);

    List<AppointRecord> selectListByTime(@Param("startTime")Long startTime, @Param("endTime")Long endTime);

    List<AppointRecord> selectRoomAndIsAppointByTime(@Param("startTime")Long startTime,@Param("endTime") Long endTime);

    List<AppointRecord> selectAppointRecords(@Param("page") int page,@Param("pageSize") int pageSize);

    Long countAppointRecords();

    List<AppointRecord> queryAppoints(@Param("studentId") String studentId,@Param("applyDate") LocalDate applyDate,@Param("startTime") Long startTime,@Param("endTime") Long endTime,@Param("page") int page,@Param("pageSize") int pageSize);

    Long countQueryAppoints(@Param("studentId") String studentId,@Param("applyDate") LocalDate applyDate,@Param("startTime") Long startTime,@Param("endTime") Long endTime);

    List<AppointRecord> queryAppointRecords(@Param("studentId") String studentId,@Param("page") int page,@Param("pageSize") int pageSize);

    Long countQueryAppointRecords(@Param("studentId") String studentId);
}

